package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.pojo.Company;
import org.example.pojo.Job;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CompanyMapper {
    Company findCompanyById(@Param("companyId") Integer companyId);

    void insertCompany(Company company);

    List<Company> selectCompanyByName(String name);

    List<Company> selectByUserIdAndName(Integer companyId, String name);

    Company selectByCompanyId(Integer companyId);


    void updateCompany(Company company);

    Company getCompanyById(Integer companyId);

    List<Company> getCompanyJob(Integer companyId);

    Integer getCount(List<Integer> counts);

    List<Job> getTopCompany(String salary, @Param("location") String city, Integer minSalary, Integer maxSalary);
}
